<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Basic_manag extends CI_Controller {

    /**
     *   网站后台
     *   王超伟
     * 	 2012.09.25
     * 	 art2006art#gmail.com
     */
    public function __construct() {
        parent::__construct();
        $this->load->helper('url');
        $this->load->helper('file');
        $this->load->helper('form');
        $this->load->database();
        $this->load->helper('func');
        $this->load->model('basic_process');
       
    }

    public function index() {

        $option_item_array = $this->basic_process->option_list();

//        foreach($option_item_array as $key=>$val){            
//           $option[$val["option_name"]]= $val["option_value"];
//        }
        //   print_r($option);
        $data["option"] = process_options_array($option_item_array);
        // print_r($data["option_list_array"]);
        $this->load->view('admin/header_view');
        $this->load->view('admin/setting_view', $data);
        $this->load->view('admin/footer_view');
    }

    public function add_basic() {
       // print_r($_POST["option"]);
        $this->basic_process->update_option($_POST["option"]);
        redirect("admin/basic_manag/");
    }

}

/* End of file admin.php */
/* Location: ./application/controllers/admin.php */
